const env = process.env.NODE_ENV // 环境参数

let MYSQL_CONF
let REDIS_CONF

if (env === 'dev') {
	// mysql
	MYSQL_CONF = {
		host: 'localhost',
		user: 'root',
		password: 'LIziyi@19920314',
		port: '3306',
		database: 'myBlog'
	}

	// redis
	REDIS_CONF = {
		port: 6379,
		hist: '127.0.0.1'
	}
}

if (env === 'production') {
	// mysql
	MYSQL_CONF = {
		host: 'localhost',
		user: 'root',
		password: 'LIziyi@19920314',
		port: '3306',
		database: 'myBlog'
	}

	// redis
	REDIS_CONF = {
		port: 6379,
		hist: '127.0.0.1'
	}
}

export { MYSQL_CONF, REDIS_CONF }
